<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //创建字符串对象
    var str = new String("hello kk");
    var str1 = "hello man";
    console.log(str);
    //length
    console.log(str.length);
    //charAt
    console.log(str.charAt(2));
    //indexof
    console.log(str.indexOf("kk"));
    //trim
    var s = str.trim();
    console.log(s);
    //substring(start,end)左闭右开
    console.log(str.substring(3,5));
    
    
    
    
    
    
</script>
</html>